<!--
  @author heguanghua
  @since 2019/06/12 11:57
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<body>

<div class="layui-fluid">

    <div class="layui-card">

        <form method="POST" class="layui-form" action="/channel/servicemaster/select.action">
            <input type="hidden" name="channelId" th:value="${query.channelId}"/>
            <div th:replace="channel/servicemaster/select/_query::query"></div>
        </form>

        <div class="layui-card-body">

            <div th:replace="channel/servicemaster/select/_table::table"></div>

            <script type="text/html" id="zmn-table-tool">
                <div class="layui-btn-container">
                    <div class="layui-btn-group" th:if="${#authPermit.checkPermit('/channel/servicemaster/add.action') || (#authPermit.checkPermit('/channel/add.action') && addFlag == '1')}">
                        <button class="layui-btn layui-btn-sm" lay-event="add">选择</button>
                    </div>
                </div>
            </script>

        </div>

    </div>

</div>
</body>
</html>

<script type="text/html" id="zmn-table-bar">
    {{#if(json.hasViewAdd){ }}
    <a style="color: #00a0e9" lay-event="add" lay-text="选择">选择</a>&nbsp;&nbsp;
    {{#}}}
</script>

<script type="text/javascript" th:inline="javascript">

    var json = {
        totalCount: [[${query.totalCount}]],
        pageSize: [[${query.pageSize}]],
        pageIndex: [[${query.pageIndex}]],
        query: [[${query}]],
        cityId: [[${query.cityId}]],
        channelId: [[${query.channelId}]],
        hasViewAdd: [[${#authPermit.checkPermit('/channel/servicemaster/add.action') || (#authPermit.checkPermit('/channel/add.action') && addFlag == '1')}]]
    };

    layui.config({
        base: "/static/lay/",
        version: 201910161937
    }).extend({
        index: "lib/index",
        channel_servicemaster_select: "channel/servicemaster/zmn.plat.channel.servicemaster.select",
    }).use(['index', 'channel_servicemaster_select']);

</script>
